<%@page import="com.zhuanzhuan.util.DaoFactory"%>
<%@page import="com.zhuanzhuan.dao.UserDaoImpl"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<jsp:useBean id="user" class="com.zhuanzhuan.model.User" scope="session"></jsp:useBean>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>更改QQ信息</title>
</head>
<body>
	<%
		String newqq = request.getParameter("qq");
		if(newqq==null||"".equals(newqq)){
			out.print("<script>alert('修改出错，请输入新的QQ！');window.history.go(-1);</script>");
		}else{
			user.setQq(newqq);
			UserDaoImpl userDao = DaoFactory.getUserDao();
			userDao.update(user);
			out.print("<script>alert('修改成功！');window.top.location.href='User.jsp';</script>");
		}
	%>
</body>
</html>